package com.qingcheng.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.qingcheng.service.goods.SpuService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/price")
@CrossOrigin//允许跨域访问
public class PriceController {

    @Reference
    private SpuService spuService;

    @GetMapping("price")
    public Integer price(String id){
        Integer price = spuService.findPrice(id);
        return price;
    }

}
